package jp.co.kayo.gae.takidashibot.utils;

import jp.co.kayo.gae.takidashibot.model.Takidasi;

public class TakidasiPair implements Comparable<TakidasiPair> {
    public double dist;
    public Takidasi takidasi;
    
    public TakidasiPair(double m, Takidasi t){
        dist = m;
        takidasi = t;
    }

    @Override
    public int compareTo(TakidasiPair o) {
        double d = dist - o.dist;
        if(d<0){
            return -1;
        }
        else if(o.dist == dist){
            return 0;
        }
        else{
            return 1;
        }
    }
}
